package main

import (
	"fmt"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/text/gstr"
	"log"
	"net/url"
	"strings"
)

func main() {
	str := "xyf-api-gateway "
	str2 := "xyf-api-gateway"
	str1 := ""
	gstr.TrimAll(str, " ")
	gstr.TrimAll(str1, " ")
	g.Dump(str, str1, str2)

	endpoint := "http://59.110.164.223/job/php-prod-xyf-open-platform//167/?foo=bar&a=b"
	if strings.Contains(endpoint, "http") {
		urlinfo, err := url.Parse(endpoint)
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(urlinfo)
		fmt.Println(urlinfo.Path + "?" + urlinfo.RawQuery)
	}

	fmt.Println(endpoint)
}
